package com.ai.web.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ai.web.service.ForumFansReplyService;
import com.ai.web.vo.ForumFansReplyV;
import com.ai.web.vo.ResultModel;
import com.tiny.persistence.domain.ForumFansReply;
import com.tiny.persistence.repository.ForumFansReplyRepo;

@Service
public class ForumFansReplyServiceImpl extends BaseServiceImpl<ForumFansReply, Integer, ForumFansReplyV> implements ForumFansReplyService  {

    @Autowired
    private ForumFansReplyRepo forumFansReplyRepo;
    
    @Autowired
    public ForumFansReplyServiceImpl(ForumFansReplyRepo forumFansReplyRepo) {
        super(forumFansReplyRepo);
    }

    public ForumFansReplyV getForumFansReply(int userId) throws Exception {
        return getT(userId);
    }

    public ResultModel saveForumFansReply(ForumFansReplyV forumFansReplyV) throws Exception {
        
        ForumFansReplyV saveV = saveT(forumFansReplyV);
        
        ResultModel rm = new ResultModel();
        rm.setData(saveV);
        rm.setSuccessCode();
        
        return rm;
    }

    public ResultModel deleteForumFansReplys(List<Integer> userIds) throws Exception {
        deleteTs(userIds);
        
        ResultModel rm = new ResultModel();
        rm.setSuccessCode();
        rm.setMsg("删除成功！");
        
        return rm;
    }

}
